
*****************
****2008 ANES****
*****************

**lib-con placement

gen demlibcon08  = V083071a
recode demlibcon08 -99/0=. 8/99=. 
*1(lib) 7(con)

gen replibcon08  = V083071b
recode replibcon08 -99/0=. 8/99=. 
*1(lib) 7(con)

gen correctlibcon08 = 1 if demlibcon08 < replibcon08
replace correctlibcon08 = 0 if correctlibcon08==.

**spending

*dem party (old) = V083107a, 1(con) 7(lib)
gen demspend08_old = V083107a
recode demspend08_old 1=7 2=6 3=5 4=4 5=3 6=2 7=1 -99/0=. 8/99=.

*dem party (new) = V083110x, 1(lib) 7(con)
gen demspend08_new = V083110x
recode demspend08_new -99/0=. 8/99=.

*rep party (old) = V083107b, 1(con) 7(lib)
gen repspend08_old = V083107b
recode repspend08_old 1=7 2=6 3=5 4=4 5=3 6=2 7=1 -99/0=. 8/99=.

*rep party (new) = V083111x, 1(lib) 7(con)
gen repspend08_new = V083111x
recode repspend08_new -99/0=. 8/99=.

gen demspend08 = demspend08_old
replace demspend08 = demspend08_new if demspend08==.

gen repspend08 = repspend08_old
replace repspend08 = repspend08_new if repspend08==.

gen correctspend08 = 1 if demspend08 < repspend08
replace correctspend08 = 0 if correctspend08==.

**defense

*dem party (old) = V083114a, 1(lib) 7(con)
gen demdefense08_old = V083114a
recode demdefense08_old -99/0=. 8/99=. 

*dem party (new) = V083117x, 1(con) 7(lib)
gen demdefense08_new = V083117x
recode demdefense08_new 1=7 2=6 3=5 4=4 5=3 6=2 7=1 -99/0=. 8/99=.

*rep party (old) = V083114b, 1(lib) 7(con)
gen repdefense08_old = V083114b
recode repdefense08_old -99/0=. 8/99=. 

*rep party (new) = V083118x, 1(con) 7(lib)
gen repdefense08_new = V083118x
recode repdefense08_new 1=7 2=6 3=5 4=4 5=3 6=2 7=1 -99/0=. 8/99=.

gen demdefense08 = demdefense08_old
replace demdefense08 = demdefense08_new if demdefense08==. 

gen repdefense08 = repdefense08_old
replace repdefense08 = repdefense08_new if repdefense08==. 

gen correctdefense08 = 1 if demdefense08 < repdefense08
replace correctdefense08 = 0 if correctdefense08==.

**health insurance

*dem party (old) = V083121a, 1(lib) 7(con)
gen demhealth08_old = V083121a
recode demhealth08_old -99/0=. 8/99=. 

*dem party (new) = V083126x, 1(lib) 7(con)
gen demhealth08_new = V083126x
recode demhealth08_new -99/0=. 8/99=. 

*rep party (old) = V083121b, 1(lib) 7(con)
gen rephealth08_old = V083121b
recode rephealth08_old -99/0=. 8/99=. 

*rep party (new) = V083127x, 1(lib) 7(con)
gen rephealth08_new = V083127x
recode rephealth08_new -99/0=. 8/99=. 

gen demhealth08 = demhealth08_old
replace demhealth08 = demhealth08_new if demhealth08==. 

gen rephealth08 = rephealth08_old
replace rephealth08 = rephealth08_new if rephealth08==. 

gen correcthealth08 = 1 if demhealth08 < rephealth08
replace correcthealth08 = 0 if correcthealth08==.


**office recognition
*speaker = V085120a
gen knowspeaker08 = V085120a
recode knowspeaker08 5=0 -2=.
*VP = V085121a 
gen knowvp08 = V085121a
recode knowvp08 5=0 -2=.
*british pm = V085122a 
gen knowpm08 = V085122a
recode knowpm08 5=0 -2=.
*chief justice = V085123a 
gen knowchief08 = V085123a
recode knowchief08 5=0 -2=.

**party control
*house = V085066 (1 - dem) (5 - rep)
gen correcthouse08 = (V085066==1)

*senate = V085067 (1 - dem) (5 - rep)
gen correctsenate08 = (V085067==1)

****final list of items:
sum correctlibcon08 correctspend08 correctdefense08 correcthealth08 knowspeaker knowvp knowpm knowchief correcthouse08 correctsenate08
